<%@ page language="java" import="java.util.*, orm.IndividualTeachingPlanWeek, util.Utility" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <TITLE>听力语言康复教学教师备课系统</TITLE>
    
	<meta http-equiv=Content-Type content="text/html; charset=utf-8">
	<meta content="MSHTML 6.00.6000.16705" name=GENERATOR>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link href="<%=request.getContextPath() %>/reference/images/Beike.css" rel="stylesheet" type="text/css">
	<script src="<%=request.getContextPath() %>/reference/WebCalendar.js" type="text/javascript"></script>
  </head>
  <script language="Javascript">
	function showNetwork(iWeekArrangeID)
	{
		form1.action="TeachingPlanArrange/ITeachingPlanWeekInfoFunction?func=showNetwork&IWeekArrangeID="+iWeekArrangeID;
	}
	function editRedirect(iWeekArrangeID)
	{
		form1.action="TeachingPlanArrange/ITeachingPlanWeekInfoFunction?func=edit&IWeekArrangeID="+iWeekArrangeID;
	}
	function deleteRedirect(iWeekArrangeID)
	{
		if(confirm("您确定要删除吗？")){
			form1.action="TeachingPlanArrange/ITeachingPlanWeekInfoFunction?func=delete&IWeekArrangeID="+iWeekArrangeID;
		}
	}
	
	function StartPage(){
		form1.action="TeachingPlanArrange/ITeachingPlanWeekInfoFunction?func=paging&sub=start";
	}
	
	function PreviousPage() {
		form1.action="TeachingPlanArrange/ITeachingPlanWeekInfoFunction?func=paging&sub=front";
	}
	function NextPage() {
		form1.action="TeachingPlanArrange/ITeachingPlanWeekInfoFunction?func=paging&sub=next";
	}
	function LastPage() {
		form1.action="TeachingPlanArrange/ITeachingPlanWeekInfoFunction?func=paging&sub=last";
	}
	function SearchPage() {
		form1.action="TeachingPlanArrange/ITeachingPlanWeekInfoFunction?func=searchPage";
	}
	function SearchCondition() {
		form1.action="TeachingPlanArrange/ITeachingPlanWeekInfoFunction?func=SearchCondition";
	}
  </script>
  <BODY>
	<form name="form1" method="post" action="">
		<input type="hidden" id="HDPageNo" name="HDPageNo" value=<%=request.getAttribute("pageNo") %>> 
		<input type="hidden" id="HDtotalPage" name="HDtotalPage" value=<%=request.getAttribute("totalPage") %>>
		<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#A4C9EC">
		    <tr>
		      <td><table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
		        
		         <tr>
		          <td width="17%" align="right" valign="middle" bgcolor="#FFFFFF">月主题教学名称：</td>
		          <td width="20%" valign="middle" bgcolor="#FFFFFF">
		          	<input name="MonthThemeName" type="text" class="boxCopy" id="MonthThemeName" value="<c:out value="${param.MonthThemeName}"/>" style="width:100px; height:19px;">
		          </td>
		        
		          <td width="17%" align="right" valign="middle" bgcolor="#FFFFFF">周主题教学名称：</td>
		          <td width="20%" valign="middle" bgcolor="#FFFFFF">
		          	<input name="WeekThemeName" type="text" class="boxCopy" id="WeekThemeName" value="<c:out value="${param.WeekThemeName}"/>" style="width:100px; height:19px;">
		          </td>
		          <td width="17%" align="right" valign="middle" bgcolor="#FFFFFF">执行日期：</td>
		          <td width="20%" valign="middle" bgcolor="#FFFFFF">
		          	<input class="boxCopy" onClick="SelectDate(this,'yyyy年MM月')" type="text" readonly name="ExecutionDate" value="<c:out value="${param.ExecutionDate}"/>" style="width:100px; height:19px;"/>
		          </td>
		         </tr>
		         
		         <tr>
		          <td width="20%" valign="middle" bgcolor="#FFFFFF"></td>
		          <td width="20%" valign="middle" bgcolor="#FFFFFF"></td>
		          <td width="20%" valign="middle" bgcolor="#FFFFFF"></td>
		          <td width="20%" valign="middle" bgcolor="#FFFFFF"></td>
		          <td width="20%" valign="middle" bgcolor="#FFFFFF"></td>
		          <td  valign="right" bgcolor="#FFFFFF">
		          	
		          	<input type="image" height="20" width="44" border="0" onclick="SearchCondition()" src="reference/images/button_see.gif" name="btnJump" />
		          </td>
		           
		        </tr>
		      </table></td>
		    </tr>
		</table> 
	  <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
	    <tr>
	      <td width="7"><img src="<%=request.getContextPath() %>/reference/images/table_1_01.gif" width="7" height="38"></td>
	      <td background="<%=request.getContextPath() %>/reference/images/table_1_05.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
	        <tr>
	          <td width="30"><img src="<%=request.getContextPath() %>/reference/images/table_1_02.gif" width="30" height="38"></td>
	          <td width="200" background="<%=request.getContextPath() %>/reference/images/table_1_03.gif"><b>我 的 个 别 教 学 周 计 划</b></td>
	          <td width="59"><img src="<%=request.getContextPath() %>/reference/images/table_1_04.gif" width="59" height="38"></td>
	          <td>&nbsp;</td>
	        </tr>
	      </table></td>
	      <td width="7"><img src="<%=request.getContextPath() %>/reference/images/table_1_06.gif" width="8" height="38"></td>
	    </tr>
	    <tr>
	      <td width="7" background="<%=request.getContextPath() %>/reference/images/table_1_07.gif">&nbsp;</td>
	      <td bgcolor="#f7fbff"><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#cfe5f5">
	        <tr>
	          <td height="25" align="center" bgcolor="#a4c9ec"><B>月主题</B></td>
	          <td height="25" align="center" bgcolor="#a4c9ec"><strong>周单元主题</strong></td>
	          <td height="25" align="center" bgcolor="#a4c9ec"><strong>计划执行老师</strong></td>
	          <td height="25" align="center" bgcolor="#a4c9ec"><strong>开始执行日期</strong></td>
	          <td height="25" align="center" bgcolor="#a4c9ec"><strong>结束执行日期</strong></td>
	          <td align="center" bgcolor="#a4c9ec"><strong>网络图</strong></td>
	          <td height="25" align="center" bgcolor="#a4c9ec"><b>编 辑</b></td>
	          <td align="center" bgcolor="#a4c9ec"><strong>删 除</strong></td>
	        </tr>
	        <%
		       	ArrayList<IndividualTeachingPlanWeek> al = (ArrayList<IndividualTeachingPlanWeek>) request.getAttribute("ITPWList");
			       	for (int i = 0; i < al.size(); i++) {
			       		String iWeekArrangeID= al.get(i).getIWeekArrangeID();
			    %>
		        <tr>
		          <td height="25" align="center" bgcolor="#FFFFFF"><%=al.get(i).getMonthThemeName() %></td>
		          <td height="25" align="center" bgcolor="#FFFFFF"><%=al.get(i).getWeekThemeName() %></td>
		          <td height="10" align="center" bgcolor="#FFFFFF"><%=al.get(i).getEnforceTeacherName() %></td>
		          <td height="10" align="center" bgcolor="#FFFFFF"><%=al.get(i).getStarPushDate() %></td>
		          <td height="15" align="center" bgcolor="#FFFFFF"><%=al.get(i).getEndPushDate() %></td>
		          <td height="5" align="center" bgcolor="#FFFFFF">
		          	
		          	<input onclick="showNetwork('<%=iWeekArrangeID %>')" type="image" src="reference/images/RadialChartHS.gif" value=<%=iWeekArrangeID%> alt="" width="16" height="16" border="0">
		          </td>
		          <td height="5" align="center" bgcolor="#FFFFFF">
		          	<input type="image" onclick="editRedirect('<%=iWeekArrangeID %>')" src="reference/images/bianji.gif" value=<%=iWeekArrangeID%> alt="编辑" width="16" height="16" border="0">
		          </td>
		          <td height="5" align="center" bgcolor="#FFFFFF">
		          	<input type="image" onclick="deleteRedirect('<%=iWeekArrangeID %>')" height=20 name=imgDelete<%=i %> alt="删除" value=<%=iWeekArrangeID%> 
	                   	src="reference/images/del.gif" width=20 border=0>
		          </td>
		        </tr>
		        <%
		        	}
		        %>
	        
	      </table>
	        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
	          <tr>
	            <td bgcolor="#e6f0f8"><table width="100%" border="0" cellspacing="0" cellpadding="3">
	              	<tr>
		                <td width="70%" align="right"><%=request.getAttribute("pageNo") %>
		                <FONT color=#c0c0c0>/<%=request.getAttribute("totalPage") %>页 &nbsp;
		                	<input name="btnStart" type="submit" value="首页 &nbsp;" onclick="StartPage()">
			                      <input name="btnFront"  id="btnFront" type="submit" value="前页 &nbsp;" onclick="PreviousPage()">
			                      <input name="btnNext" id="btnNext" type="submit" value="后页 &nbsp;" onclick="NextPage()">
			                      <input name="btnLast" id="btnLast" type="submit" value="尾页 &nbsp;" onclick="LastPage()"> 
		                      </font>第
		                        <input class="boxCopy" maxlength="5" value="<%=request.getAttribute("pageNo") %>" size="5" name="PageNo" id="PageNo"/>
		                        页</td>
		                      <td align="right" width="20">
		                      	<input type="image" height="16" width="18" onclick="SearchPage()" src="reference/images/button_go.gif" name="btnJump" />
		            		</td>
		              </tr>
	            </table></td>
	          </tr>
	        </table></td>
	      <td width="7" background="<%=request.getContextPath() %>/reference/images/table_1_09.gif">&nbsp;</td>
	    </tr>
	    <tr>
	      <td width="7"><img src="<%=request.getContextPath() %>/reference/images/table_1_10.gif" width="7" height="22"></td>
	      <td background="<%=request.getContextPath() %>/reference/images/table_1_11.gif">&nbsp;</td>
	      <td width="7"><img src="<%=request.getContextPath() %>/reference/images/table_1_12.gif" width="8" height="22"></td>
	    </tr>
	  </table>
	</form>
	</BODY></HTML>
	<script language="javascript">
		if (document.getElementById("HDPageNo").value == 1) {
			document.getElementById("btnFront").disabled = 'true';
		} 
		
		if (document.getElementById("HDPageNo").value == <%=request.getAttribute("totalPage") %>) {
			document.getElementById("btnNext").disabled = 'true';
		}
		if (document.getElementById("PageNo").value > <%=request.getAttribute("totalPage") %> && <%=request.getAttribute("totalPage") %> != 0 || document.getElementById("PageNo").value < 1) {
			alert("超出合理页面范围，请重新填写");
			
		}
		
	</script>
